<script type="text/javascript">

  var iNum1 = 56;
  alert(iNum1); // 56

  var iNum2 = 056; // OCTAL
  alert(iNum2); // 46 is decimal of Octal number 056

  var iNum3 = 0x56; // Hexa Decimal
  alert(iNum3); // 86 is decimal of Hexa Decimal number 0x56

  var iNum4 = 56.78;
  alert(iNum4); // 56.78


/***
* Ques : WHAT IS NaN ?
* Ans  : NaN is acronym of "Not a Number".Whenever parser unable to convert to INT then it occur.
**/


/***
* NOTE : parseInt() is used to convert any datatype to INT
**/

  var str1 = 'test';
  var check1 = parseInt(str1);
  alert(check1);// It shows NaN because test is not a number

  var str2 = '123';
  var check2 = parseInt(str2);
  alert(check2);// it shows output 123


var iNum1 = parseInt('1234blue'); //returns 1234
var iNum2 = parseInt('0xA');      //returns 10
var iNum3 = parseInt('22.5');     //returns 22
var iNum4 = parseInt('blue');     //returns NaN

/**
* The toFixed() method returns a string representation of a number with a specified number of decimal
* points.
**/
var oNumberObject = new Number(99);
alert(oNumberObject.toFixed(2)); //outputs "99.00"


</script>

